package string;

/**
 * 说明:
 *
 * @author: luohaowei
 * @date:2023/2/28
 **/
public class StringBuildDemo {
    public static void main(String[] args) {
        String str="好好学习wx";
        StringBuilder builder=new StringBuilder(str);
        builder.append(",为了与结果合法规定");
        System.out.println(builder);
        builder.replace(9,16,"去玩儿推欧赔");
        System.out.println(builder);
        builder.delete(0,8);
        System.out.println(builder);
        builder.insert(0,"活着");
        System.out.println(builder);
        /*
        String str="好好学习wx";
        StringBuild build=new StringBuild(str);
        build.append("",为了与结果合法规定"");
        System.out.println(builder);
        builder.replace(9,16,"去玩儿推欧赔");
        System.out.peintln(builder);
        builder.delete(0,8);
        System.out.peintln(builder);
        builder.insert(0,"活着");
        System.out.println(builder);

         */





















        /*
        StringBuilder builder1=new StringBuilder();
        StringBuilder builder2=new StringBuilder("abc");
        String str="abc";
        StringBuilder builder3=new StringBuilder(str);
        String str2=builder3.toString();
         */
    }
}
